public class Array03 {
    static float avg(int[] arr){
        float sum = 0;
        for (float a :arr) {
            sum += a;
        }
        return  (sum / arr.length);
    }
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5,6,7};
        System.out.println(avg(arr));
    }
}
